<?php
declare (strict_types = 1);

namespace app\api\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class MissionLinks extends Model
{   


    protected $json = ['links_data'];
    protected $jsonAssoc = true;


    public function userInfo()
    {
        return $this->hasone("user", 'u_id', "u_id");
    }

    public static function getStatus($int = 0)
    {
        $res = [
            1  => '任务发布',
            2  => '推送成功',           
            -1 => '推送失败',
        ];


        return $int > 0 ? $res[$int] : $res;
    }

}
